package com.sz.mes.entity;

import java.util.Date;
import java.lang.Double;
import java.math.BigDecimal;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.Length;
import java.util.List;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.sz.mes.entity.BaseCustomEntity;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.diboot.core.util.D;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 销售订单 Entity定义
 * @author hem
 * @version 1.0
 * @date 2023-09-05
 * Copyright © szhs
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sale_order")
public class SaleOrder extends BaseCustomEntity {

    private static final long serialVersionUID = 1283138781183668031L;

    /**
     * 料品财务分类
     */
    @Length(max = 100, message = "料品财务分类长度应小于100")
    @TableField()
    private String materialFinancial;

    /**
     * 料号
     */
    @Length(max = 100, message = "料号长度应小于100")
    @TableField()
    private String productNum;

    /**
     * 客户简称
     */
    @Length(max = 100, message = "客户简称长度应小于100")
    @TableField()
    private String clientName;

    /**
     * 业务负责人
     */
    @Length(max = 100, message = "业务负责人长度应小于100")
    @TableField()
    private String businessManager;

    /**
     * 订单号
     */
    @Length(max = 100, message = "订单号长度应小于100")
    @TableField()
    private String orderNum;

    /**
     * 订单行号
     */
    @Length(max = 100, message = "订单行号长度应小于100")
    @TableField()
    private String orderRow;

    /**
     * 料品规格
     */
    @Length(max = 100, message = "料品规格长度应小于100")
    @TableField()
    private String specification;

    /**
     * 销售订单行.料品.料品.库存主单位
     */
    @Length(max = 100, message = "销售订单行.料品.料品.库存主单位长度应小于100")
    @TableField()
    private String unit;

    /**
     * 料品名称
     */
    @Length(max = 255, message = "料品名称长度应小于255")
    @TableField()
    private String productName;

    /**
     * 订单数量
     */
    @TableField()
    private Integer orderQuantity;

    /**
     * 下单日期
     */
    @JsonFormat(pattern = D.FORMAT_DATE_Y4MD)
    @TableField()
    private Date buyDate;

    /**
     * 合同要求日期
     */
    @JsonFormat(pattern = D.FORMAT_DATE_Y4MD)
    @TableField()
    private Date contractDemandDate;

    /**
     * 客户采购员
     */
    @Length(max = 100, message = "客户采购员长度应小于100")
    @TableField()
    private String clientPurchasePerson;

    /**
     * 未出货数量
     */
    @TableField()
    private Integer unshippedGoodsQuantity;

    /**
     * 客户使用人
     */
    @Length(max = 100, message = "客户使用人长度应小于100")
    @TableField()
    private String clientUser;

    /**
     * 累计出货数量
     */
    @TableField()
    private Integer totalShipmentQuantity;

    /**
     * 客户物料号
     */
    @Length(max = 100, message = "客户物料号长度应小于100")
    @TableField()
    private String clientProductNum;

    /**
     * 客户图号
     */
    @Length(max = 100, message = "客户图号长度应小于100")
    @TableField()
    private String clientPicNum;

    /**
     * 客户工厂代码
     */
    @Length(max = 100, message = "客户工厂代码长度应小于100")
    @TableField()
    private String clientFactoryCode;

    /**
     * 客户库位
     */
    @Length(max = 100, message = "客户库位长度应小于100")
    @TableField()
    private String clientLocation;

    /**
     * 收货地址
     */
    @Length(max = 255, message = "收货地址长度应小于255")
    @TableField()
    private String deliveryAddress;

    /**
     * 物料描述
     */
    @Length(max = 255, message = "物料描述长度应小于255")
    @TableField()
    private String materialDescription;

    /**
     * 订货客户.客户名称
     */
    @Length(max = 100, message = "订货客户.客户名称长度应小于100")
    @TableField()
    private String customerName;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createBy;

    /**
     * excel内容
     */
    @TableField()
    private String excelData;
}
